package net.asfun.jvalog.service;

import javax.jdo.JDOHelper;
import javax.jdo.PersistenceManager;
import javax.jdo.PersistenceManagerFactory;

public class DbAccessor {

	private static final PersistenceManagerFactory pmf =
		JDOHelper.getPersistenceManagerFactory("jvalog");
	
	private PersistenceManager pm;
	
	public DbAccessor() {
		pm = pmf.getPersistenceManager();
	}
	
	public PersistenceManager connect() {
		return pm;
	}
	
	public void close() {
		pm.close();
	}
}
